<?php

namespace app\payment\validate;

use think\Validate;

/**
 * 银行卡验证器
 */
class BankCard extends Validate {

    //定义验证规则
    protected $rule = [
        'merchant_id|商户号' => 'require|number',
        'bank_type|银行卡类型' => 'require',
        'bank_name|收款银行名称' => 'require|chs',
        'name|收款人姓名' => 'require',
        'id_card|收款人身份证' => 'require',
        'bank_card|收款银行卡' => 'require|confirm',
        'account_type|账户类型' => 'require',
        'account_opening_branch|开户支行' => 'require',
        'couplet_number|联行号' => 'requireIf:account_type,公户|length:1,50',
        'province|省份名称' => 'require|chs',
        'city|城市名称' => 'require|chs',
    ];
    //定义验证提示
    protected $message = [
    ];
    //定义验证场景
    protected $scene = [
    ];

}
